Add documentation for .otignore feature (OT-1318)#16
Add documentation for .otignore feature (OT-1318)#16stephenbryant-opentrace merged 7 commits intomainfrom
Conversation
|
📚 Documentation Preview Preview deployed to: https://opentrace.github.io/docs/preview/16-merge/ |
docs/otignore.md
Outdated
| **/__mocks__/ | ||
|
|
||
| # But keep test code | ||
| !**/*_test.go |
There was a problem hiding this comment.
SUGGESTION: This example for re-including test files is misleading. According to gitignore pattern rules, it is not possible to re-include a file if one of its parent directories is excluded.
Since directories like **/fixtures/ and **/testdata/ are excluded on lines 240-241, the negation patterns on lines 248-249 will have no effect for any files inside those directories.
To make this work, you would need a more complex set of patterns, or you should clarify this limitation. For example, you could explain that users should exclude file contents (**/testdata/**) rather than the directory itself (**/testdata/) if they intend to re-include specific files from within it.
|
This merge request adds comprehensive and valuable documentation for the .otignore feature. The changes are well-documented, verified against the implementation, and improve user understanding of the feature. It is a low-risk, high-value addition to the codebase. Attached by run j-7428cc35-25b2-4aff-97bc-a00765deaafb |
Comprehensive documentation for the .otignore and .opentraceignore files that allow users to exclude files and directories from OpenTrace analysis. ## Changes - Add docs/otignore.md with complete feature documentation - Update mkdocs.yml navigation to include "Excluding Files" section ## Documentation Includes - Overview and comparison with .gitignore - Quick start guide - Pattern syntax reference with examples - Common use cases (generated code, dependencies, test fixtures) - Troubleshooting guide - Technical implementation details - Best practices ## Verification All documentation verified against implementation in: - insight-agent/src/source_analyzers/sources/otignore.py - insight-agent/src/source_analyzers/sources/directory/parser.py - insight-agent/src/source_analyzers/sources/code/parser.py - Unit and integration tests Relates to: OT-1318, OT-1364 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
5b635c6 to
457520d
Compare
docs/otignore.md
Outdated
| **/__mocks__/ | ||
|
|
||
| # But keep test code | ||
| !**/*_test.go |
There was a problem hiding this comment.
SUGGESTION: This example for re-including test files is misleading. According to gitignore pattern rules, it is not possible to re-include a file if one of its parent directories is excluded.
Since directories like **/fixtures/ and **/testdata/ are excluded on lines 240-241, the negation patterns on lines 248-249 will have no effect for any files inside those directories.
To make this work, you would need a more complex set of patterns, or you should clarify this limitation. For example, you could explain that users should exclude file contents (**/testdata/**) rather than the directory itself (**/testdata/) if they intend to re-include specific files from within it.
|
Rejecting based on the 'Key Findings & Suggestions' in the review summary. The summary notes a misleading example regarding the re-inclusion of files from an excluded parent directory. Please update the documentation to clarify this limitation as recommended before this can be approved. Attached by run j-7c92296f-b01f-4f4f-b9c3-6d4e0a335dad |
- Add reference to Excluding Files page in 'What Gets Synced' sections - Helps users discover how to exclude files from analysis
There was a problem hiding this comment.
I've reviewed the new documentation for the .otignore feature. The changes look good overall, adding helpful links from the GitHub and GitLab integration pages to the new, comprehensive guide.
I left a couple of minor suggestions. In the new otignore.md file, there's a pattern in the Python example that might be confusing, so I pointed that out. I also suggested a small tweak to the site navigation in mkdocs.yml to make the new "Excluding Files" page easier to find.
The core documentation for .otignore is well-written and thorough. No major issues found.
Attached by run j-73adb884-d365-4818-898f-98c27e7433a5
| *.pyc | ||
| *.pyo | ||
| *.pyd | ||
| .Python |
There was a problem hiding this comment.
OBSERVATION: The pattern .Python is not a standard Python-related file or directory that is typically ignored. It might be a typo or a very specific convention. If it's not a typo, it could be confusing for users. Standard patterns usually include __pycache__/, *.pyc, and virtual environment folders like venv/. Consider removing this line if it's not a common pattern to avoid confusion.
mkdocs.yml
Outdated
| - GitHub: integrations/github.md | ||
| - GitLab: integrations/gitlab.md | ||
| - AWS EKS (Early Access): integrations/aws-eks.md | ||
| - Excluding Files: otignore.md |
There was a problem hiding this comment.
SUGGESTION: The "Excluding Files" documentation is a general feature that applies to multiple data sources, not a data source itself. Placing it under the "Data Sources" section might be confusing.
Consider moving it up to be a direct child of "Integrations" to make it more discoverable and reflect its cross-cutting nature. For example:
- Integrations:
- Overview: integrations/index.md
- Excluding Files: otignore.md
- AI Assistants:
...
- Data Sources:
...|
The merge request is being rejected because the review summary indicates that the new documentation ( Attached by run j-73adb884-d365-4818-898f-98c27e7433a5 |
… their parent directories are already excluded
…files not being visible unless they're committed. It's not the same thing, and is already covered elsewhere.
- Add 'Default Exclusions' section listing always-excluded directories - Explains that .git, node_modules, build, etc. are automatically skipped - Notes that default exclusions work alongside custom .otignore patterns - Adds rationale for why these directories are excluded by default
|
This is a well-structured and comprehensive documentation update for the .otignore feature. The changes are clear, address previous feedback, and improve the user-facing documentation without any negative impact on the codebase. The improved documentation will enhance user experience and reduce potential support questions. Attached by run j-3a43e284-a44c-4580-be10-dbd56ae03614 |
Overview
This merge request introduces comprehensive documentation for the
.otignoreand.opentraceignorefiles. These files empower users to exclude specific files and directories from OpenTrace analysis, offering granular control over the scan scope. The new documentation provides clear guidance on configuration, pattern syntax, and best practices to ensure users can effectively utilize this feature.This version incorporates all feedback from the initial review to improve the clarity, correctness, and organization of the content.
Technical Details
docs/otignore.md(Added).otignorefeature, its purpose, and usage.**/testdata/**) rather than the directory itself (**/testdata/), aligning with standard.gitignorebehavior..Pythonpattern example was removed.mkdocs.yml(Modified)docs/integrations/github.md(Modified).otignorefunctionality, ensuring users are aware of the feature within their integration context.Review Summary
This revision successfully addresses all feedback from the previous review cycle.
mkdocs.ymlfor better discoverability..Pythonexample has been removed fromdocs/otignore.mdto prevent user confusion.Impact Assessment
Relates to: OT-1318, OT-1364
Attached by run j-3a43e284-a44c-4580-be10-dbd56ae03614